#pragma once
#include <stdio.h>
#include <string>

#define DRONE_IP "192.168.1.1"
#define AT_PORT 5556
#define NAV_DATA_PORT 5554
#define VIDEO_PORT 5555

namespace ARDroneCom{

using namespace System;
using namespace System::IO;
using namespace System::Net;
using namespace System::Text;
using namespace System::Net::Sockets;
using namespace System::Collections;

ref class Communication
{

private: System::Net::Sockets::Socket^ ATSock;			//Port: 5556
private: System::Net::Sockets::Socket^ NavDataSock;		//Port: 5554
private: System::Net::Sockets::Socket^ VideoSock;		//Port: 5555

private: System::Net::IPEndPoint^ ATEndPoint;
private: System::Net::IPEndPoint^ NavDataEndPoint;
private: System::Net::IPEndPoint^ VideoEndPoint;
	
private: String^ InputBuffer;
public:
	Communication(void);


public:	Socket^ getATSock(void);
public:	Socket^ getNavDataSock(void);
public:	Socket^ getVideoSock(void);

public:	IPEndPoint^ getATEndpoint(void);
public:	IPEndPoint^ getNavDataEndpoint(void);
public:	IPEndPoint^ getVideoEndpoint(void);

public:	int Connect(Socket^, IPEndPoint^);
public:	int Disconnect(Socket^);
public: int sendString(wchar_t *);
public: String^ receiveString(Socket^);
};
}